package com.example.erp.dto.systemDTO.resourceDTO;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@JsonIgnoreProperties(value = {"path"},allowSetters = true)
public class FileDTO {
    private final String fileName;
    private final String fileType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private final LocalDateTime date;
    private final String src;
    private final String path;
    private final Long size;

    public FileDTO(String fileName, String fileType, LocalDateTime date, String src,String path,Long size) {
        this.fileName = fileName;
        this.fileType = fileType;
        this.date = date;
        this.src = src;
        this.path=path;
        this.size=size;
    }
}
